package com.huq.oss;

import java.util.List;

import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.Bucket;
import com.aliyun.oss.model.OSSObject;
import com.aliyun.oss.model.ObjectMetadata;

public class OSSUtil {
    private static String endpoint="http://oss-cn-hangzhou.aliyuncs.com";
    private static String accessKeyId="0Em05Ju0uHrHbmRK";
    private static String secretAccessKey="DnLF8bly13bWHDT02rctLotRynI1ZO";
    public static void getOssObject(String bucketName,String key){
	OSSClient client=new OSSClient(endpoint, accessKeyId,secretAccessKey);
	List<Bucket> buckets=client.listBuckets();
	OSSObject object=client.getObject(bucketName, key);
	ObjectMetadata data=new ObjectMetadata();
    }
    
    
    
    
public static void main(String[] args) {
    getOssObject("site-pic-pro", "Penguins.jpg");
}
}
